package com.forte.shoppingcustomerdao;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;

import com.forte.deliverydao.Delivery;

@Entity(name="shoppingaddress")
public class Address implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name="address_id")
	private int addressid;
	
	@Column(name="customer_id")
	private int customerId;
	
	@Column(name="street_address")	
	private String streetAddress;
	
	@Column(name="city")
	private String city;
	
	@Column(name="delivery_id")
	private int deliveryId;
	
	@Column(name="country")
	private String country;
	
	@Column(name="address_type")
	private String addressType;
	
	@ManyToOne
	@JoinColumn(name="customer_id", insertable=false, updatable=false)	
	private ShoppingCustomer customer;
	
	@ManyToOne
	@JoinColumn(name="delivery_id", insertable=false, updatable=false)
	private Delivery delivery;

	public int getCustomerId() {
		return customerId;
	}

	public void setCustomerId(int customerId) {
		this.customerId = customerId;
	}

	public String getStreetAddress() {
		return streetAddress;
	}

	public void setStreetAddress(String streetAddress) {
		this.streetAddress = streetAddress;
	}	

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public int getDeliveryId() {
		return deliveryId;
	}

	public void setDeliveryId(int deliveryId) {
		this.deliveryId = deliveryId;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getAddressType() {
		return addressType;
	}
	
	public void setAddressType(String addressType){
		this.addressType = addressType;
	}
	
	public ShoppingCustomer getCustomer() {
		return customer;
	}

	public Delivery getDelivery() {
		return delivery;
	}

	public int getAddressid() {
		return addressid;
	}

	public void setAddressid(int addressid) {
		this.addressid = addressid;
	}
}
